package com.gimi.cloud.jimi.client.service.userInfo.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gimi.cloud.jimi.client.service.userInfo.BankCardService;
import com.gimi.cloud.jimi.dao.dao.bank.BankDao;
import com.gimi.cloud.jimi.entity.bank.BankCard;
@Service
@Transactional
public class BankCardServiceImpl implements BankCardService {
	
	@Autowired
	private BankDao bankDao;

	@Override
	public Map<String, Object> getAuthenticationInfo(Integer userId) {
		Map<String, Object> map = new HashMap<>();
		BankCard bankCard = bankDao.getBankByUserId(userId);
		//无数据
		if (bankCard == null) {
			map.put("status", 0);
			return map;
		}else {
			map.put("status", 1);
			map.put("data",bankCard);
			return map;
		}
	}

}
